package operation.modules.operation.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import operation.modules.operation.entity.StatisticEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface StatisticDao extends BaseMapper<StatisticEntity> {
    /**
     * 查询页面
     * @param page
     * @param queryWrapper
     * @param logicNotDeleteValue
     * @return
     */
    List<StatisticEntity> queryPage(IPage<StatisticEntity> page,
                                    @Param(Constants.WRAPPER) QueryWrapper<StatisticEntity> queryWrapper,
                                    @Param("logicNotDeleteValue") Integer logicNotDeleteValue);

    /**
     * 批量插入
     * @param StatisticEntities
     */
    void batchInsert(List<StatisticEntity> StatisticEntities);

    /**
     * 删除重复数据
     */
    void deleteRepeat();

    /**
     * 查询导出列表
     * @param queryWrapper
     * @param logicNotDeleteValue
     * @return
     */
    List<StatisticEntity> queryExportList(@Param(Constants.WRAPPER) QueryWrapper<StatisticEntity> queryWrapper,
                                          @Param("logicNotDeleteValue") Integer logicNotDeleteValue);

    /**
     * 根据id删除
     * @param map
     */
    void deleteBatchUserIds(Map<String, Object> map);
}
